package com.xiaolin.date;

import java.sql.Date;
import java.sql.Timestamp;
import java.time.*;

/**
 * @ClassName TestDay
 * @Description TODO
 * @Detail detail
 * @Author MyPC
 * @Date 2020/9/27
 * @Version 1.0
 */
public class TestDay {
    public static void main(String[] args) {
        //当前是几月几号
        MonthDay monthDay = MonthDay.now();
        System.out.println(monthDay);
        //当前年月日
        LocalDate localDate = LocalDate.now();
        System.out.println(localDate);
        //当前时分秒
        LocalTime localTime = LocalTime.now();
        System.out.println(localTime);
        //当前年月日 时分秒
        LocalDateTime localDateTime = LocalDateTime.of(localDate, localTime);
        System.out.println(localDateTime);
        //获取当前地区的时间
        ZonedDateTime zonedDateTime = ZonedDateTime.now();
        System.out.println(zonedDateTime);
    }
}
